# 提交的数据为str格式
import requests

url = 'https://httpbin.org/post'
data= "{'name': 'tynam','password':'123456'}"

response = requests.post(url=url, data=data)
print(response.text)

# {
#   "args": {},
#   "data": "{'name': 'tynam','password':'123456'}",
#   "files": {},
#   "form": {},
#   "headers": {
#     "Accept": "*/*",
#     "Accept-Encoding": "gzip, deflate",
#     "Content-Length": "37",
#     "Host": "httpbin.org",
#     "User-Agent": "python-requests/2.32.3",
#     "X-Amzn-Trace-Id": "Root=1-684158a7-139d0197294aa77e0e1b76bc"
#   },
#   "json": null,
#   "origin": "116.24.222.235",
#   "url": "https://httpbin.org/post"
# }
